<?php
/*
    $dbname='em_bd.sqlite';

    $base=new SQLite3($dbname, 0666); 
    
*/
include_once 'conectar_bd.php';
$base=  conectar_solo_lectura();

session_start();
$usr=$_SESSION['login_user'];

$sql="SELECT usuario, password FROM admin_user WHERE usuario='$usr'";
$results = $base->query($sql);
$row=$results->fetchArray();
$pass_tabla=$row['usuario'];



$login_session=$row['usuario'];

if(!isset($login_session))
{
header("Location: index.php");
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<title>Admin</title>
		<link rel="stylesheet" type="text/css" href="css/admin.css" />
		<link rel="shortcut icon" href="img/favicon.ico" type="image/x-ico"/>
		
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
		
		<!-- Bootstrap -->
		<link href="librerias/css/bootstrap.min.css" rel="stylesheet" media="screen"/>
		<link rel="stylesheet" type="text/css" href="css/ajustes.css" />
		<link rel="stylesheet" type="text/css" href="css/cambiando_estilo.css" />
		
		
		 <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
		 <link rel="stylesheet" href="/resources/demos/style.css" />
		 
		 <script src="http://code.jquery.com/jquery-1.9.1.js" type="text/javascript"></script>
		 <script src="librerias/js/bootstrap.min.js" type="text/javascript"></script>
		 <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js" type="text/javascript"></script>
		  
	
		<script src="js/loadXML.js" type="text/javascript"></script>
		<script src="js/scripts.js" type="text/javascript"></script>
		<script src="js/chequear_estilo.js" type="text/javascript"></script>
		<script src="js/admin_js.js" type="text/javascript"></script>
		
		<link rel="stylesheet" type="text/css" href="css/estilo1.css" id="css_que_cambia"></link>
		<link rel="stylesheet" type="text/css" href="css/autores_css.css"></link>
                
                <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
                <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
                
                
  
		
	</head>

	<body>
            
		
		<!-- Menú superior -->
		<!--=========== BOTONES DE CAMBIO DE ESTILO ================-->
		<div class="row-fluid">
                    <div class="span12">
                        
                        <!--form-->
                        <div id="radio">
                            <input type="radio" id="radio1" name="radio" onclick="cambiarCss1()"/>
                            <label for="radio1" id="label1">Style 1</label>
                            <input type="radio" id="radio2" name="radio" onclick="cambiarCss2()"/>
                            <label for="radio2" id="label2">Style 2</label>
                        </div>
                        <!--/form-->
                            
                    </div>
		</div>
		<!--=========== ENCABEZADO ================-->
		<div class="container">
		<div class="row-fluid" id="encabezado_">
		
			<div class="span12 barra_s" id="barra_bot_log">
				<!-- logo-->
				<div class="span4 well logo_s">
					<img id="logo_img" src="img/LOGO1ELI.png" alt="logo"/>
				</div>
				<!-- botones -->
				<div class="span8 well botones_s">
					<ul class="lista_botones">
						<li class="boton_l"><a href="autores.html" class="links" >Autores</a></li>
						<li class="boton_l" id="boton_readme"><a href="readme.html" class="links">Readme</a></li>
						
					</ul>
				</div>
				
			</div>
		</div>
		
		<div class="row-fluid">
			<div class="span12">
				<ul class="breadcrumb">
					<li><a href="index.php" class="breadcrumb_link">Home</a> <span class="divider">/</span></li>
					<li class="active"><span class="breadcrumb_actual">Autores</span></li>
				</ul>
			</div>
		</div>
		</div>
		
		
		<!--=========== CUERPO ADMIN================-->
		 
		 <div class="container">
		
                 <div class="row-fluid">
					
			<div class="span12 ppal"> 
                            
                                    <h1 id="titulo_admin">
                                        Bienvenido admin!   
                                    </h1>
                            <div class="row-fluid">
                                    <div class=" well izq span3 izq_admin">
                                        
                                        
                                        
					<ul class="nav nav-list izq_admin2">
						    <li class="nav-header title_list"><h5 class="titulo_panel">Opciones de configuracion</h5></li>
						    <li class="item_menu2">
                                                        <a class="link_admin" href="data/em_bd.sqlite">
                                                            <button type="button" class="botones_admin" >
                                                                 Data Backup
                                                            </button>
                                                        </a>
                                                    </li>
                                                    <li class="item_menu2">
                                                        <button type="button" id="boton_paginado" class="botones_admin" onclick="panel_cambiar_paginado()">
                                                             Modificar paginado
                                                        </button>
                                                    </li>
                                                    <li class="item_menu2"> 
                                                        <button type="button" id="boton_orden" class="botones_admin" onclick="panel_cambiar_orden()">
                                                             Modificar Orden
                                                        </button>
                                                    </li>
                                                    
                                                    <li class="item_menu2">
                                                        <button type="button" id="boton_propiedad" class="botones_admin" onclick="panel_cambiar_propiedad()">
                                                             Cambiar Distribución Propiedad
                                                        </button>
                                                    </li>

                                                    <li class="item_menu2">
                                                        <button type="button" id="boton_propiedades" class="botones_admin" onclick="Arrastrar()">
                                                            Modificar propiedades
                                                        </button>
                                                    </li>
                                                    
                                                    <li class="item_menu2">
                                                        <button type="button" id="boton_pass" class="botones_admin" onclick="cambiar_pass()">
                                                            Cambiar password admin
                                                        </button>
                                                    </li>
                                                    <li class="item_menu2">
                                                        <a class="link_admin " href="logout.php?url=index.php">
                                                            Logout
                                                        </a>
                                                    </li>
			
					    </ul>
                                      
                                    </div>
                                
                                     <div class="span9 well panel">

                                        
                                         
                                         
                                        
                                         
                                     </div>
     	</div>
		<!--=========== PIE================-->
		<div class="row-fluid">
			<div class="span12 well pie">
				
					<div class="span2 offset10">
						&copy; IAW 2013
					</div>
					
				
			</div>
		</div>	
		</div>
    
		
		
			
	</body>
</html>
